package lelouet.datacenter.thermal.impacts.impactGenerators;

import gridlib.api.Grid;

import java.util.ArrayList;
import java.util.Arrays;

import lelouet.datacenter.thermal.impacts.ImpactGenerator;
import lelouet.datacenter.thermal.impacts.ImpactMap;

public class SequentialGenerator extends ArrayList<ImpactGenerator> implements
		ImpactGenerator {

	private static final long serialVersionUID = 1L;

	public SequentialGenerator(ImpactGenerator... generators) {
		super(Arrays.asList(generators));
	}

	@Override
	public void apply(Grid grid, ImpactMap storage) {
		for (ImpactGenerator gen : this) {
			gen.apply(grid, storage);
		}
	}

}
